{include file="public/header" /}
<body>
<style>
    .cion{
        display: inline-block;
        width: 120px;
    }
</style>
<div class="page-container">
    <form  method="get" action="">
        <div class="text-c">
            日期范围：
            <input type="text" onfocus="WdatePicker()" value="{:input('get.start')}" name="start" id="datemin" class="input-text Wdate" style="width:120px;" autocomplete="off">
             -
            <input type="text" onfocus="WdatePicker()" value="{:input('get.end')}" name="end" id="datemax" class="input-text Wdate" style="width:120px;" autocomplete="off">
            <input type="text" class="input-text" style="width:250px" placeholder="手机号" value="{:input('word')}" name="word">
            <span class="select-box" style="width: 100px;">
                <select name="status" class="select">
                    <option value="-1">状态</option>
                    <option value="0" {if isset($_GET['status']) && $_GET['status'] == 0}selected{/if}>审核中</option>
                    <option value="1" {if isset($_GET['status']) && $_GET['status'] == 1}selected{/if}>审核成功</option>
                    <option value="2" {if isset($_GET['status']) && $_GET['status'] == 2}selected{/if}>审核拒绝</option>
                </select>
            </span>
            <span class="select-box" style="width: 100px;">
                <select name="agent_id" class="select">
                    <option value="0">代理商</option>
                    {foreach $agents as $v}
                        {if isset($_GET['agent_id']) && $v.id ==  $_GET['agent_id']}
                        <option value="{$v.id}" selected>{$v.nickname}</option>
                        {else/}
                        <option value="{$v.id}">{$v.nickname}</option>
                        {/if}
                    {/foreach}
                </select>
            </span>
            <button type="submit" class="btn btn-success">搜索</button>
        </div>
    </form>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
         <span class="l">
<!--            <a href="javascript:;" onclick="layopen('新增代理商','{:url('agentEdit')}',800,600)" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>新增代理商</a>-->
        </span>
        <span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-hover table-bg">
        <thead>
            <tr>
                <th scope="col" colspan="12">商户申请列表</th>
            </tr>
            <tr class="text-c">
                <th width="50">标识</th>
                <th width="100">申请代理商</th>
                <th width="120">商户昵称</th>
                <th width="100">商户手机</th>
                <th width="20">商户行业</th>
                <th width="100">商户地址</th>
<!--                <th width="100">营业执照</th>-->
<!--                <th width="50">门店图片</th>-->
                <th width="50">状态</th>
                <th width="50">申请备注</th>
                <th width="50">申请时间</th>
                <th width="60">操作</th>
            </tr>
        </thead>
        <tbody>
            {foreach $list as $v}
            <tr class="text-c">
                <td class="text-l">{$v.id}</td>
                <td class="text-l">{$v.agent}</td>
                <td class="text-l">{$v.name}</td>
                <td class="text-l">{$v.mobile}</td>
                <td class="text-l">{$v.industry_name}</td>
                <td class="text-l">{$v.address}</td>
                <td class="text-l">
                    {switch name="$v.status"}
                    {case value="0"}审核中{/case}
                    {case value="1"}审核成功{/case}
                    {case value="2"}审核失败{/case}
                    {default /}--
                    {/switch}
                </td>
                <td class="text-l">{$v.remark}</td>
                <td class="text-l">{:date('Y-m-d H:i:s',$v['time'])}</td>
                <td>
                    <a class="btn-link" title="编辑审核" href="javascript:;" onclick="layopen('编辑审核','{:url('shop_apply_detail',['id'=>$v.id])}')">编辑审核</a>
                </td>
            </tr>
            {/foreach}
        </tbody>
    </table>
    <div class="page">
        {$list->render()|raw}
    </div>
</div>

{include file="public/footer" /}

<script type="text/javascript">
    function viewImage(url) {
        window.open(url,"_blank")
    }

</script>

</script>